package hhh.app.common.rxjava;

import rx.Observable;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;

/**
 * Created by hhh on 2016/12/9.
 */
public class SchedulersCompat {
    public static <U> Observable.Transformer<U,U> io_main(){
        return new Observable.Transformer<U, U>() {
            @Override
            public Observable<U> call(Observable<U> uObservable) {
                return uObservable
                        .subscribeOn(Schedulers.io())
                        .observeOn(AndroidSchedulers.mainThread());
            }
        };
    }
}
